from monulu.raid.models import Raid, Raider
from monulu.sk.models import SKList, SKInstance, SKStart, SKSuicide
from django.contrib import admin

class SKRaiderInline(admin.TabularInline):
    model = Raider
    extra = 2
class SKSuicideInline(admin.TabularInline):
    model = SKSuicide
    extra = 1
    
class SKInstanceInline(admin.TabularInline):
    model = SKInstance
    extra = 1

class SKRaidAdmin(admin.ModelAdmin):
    inlines = [SKRaiderInline, SKSuicideInline]
    list_display = ('instance','characters_required','signups','start_time','ends')
    
class SKListAdmin(admin.ModelAdmin):
    inlines = [SKInstanceInline]

class SKStartAdmin(admin.ModelAdmin):
    list_display = ('sklist','character','initial_rank')
    
class SKSuicideAdmin(admin.ModelAdmin):
    list_display = ('pk', 'raid', 'sklist','is_suicide','character','boss','item','note')

admin.site.unregister(Raid)
admin.site.register(Raid, SKRaidAdmin)
admin.site.register(SKList, SKListAdmin)
admin.site.register(SKStart, SKStartAdmin)
admin.site.register(SKSuicide, SKSuicideAdmin)
